package com.teensoft.base.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.hibernate.Query;
import org.hibernate.criterion.Order;

import com.teensoft.base.exception.DAOException;

@SuppressWarnings("unchecked")
public interface IDAO<T> {

	public T get(Class<T> class1, Serializable serializable)
			throws DAOException;

	public T load(Class<T> class1, Serializable serializable)
			throws DAOException;

	public List<T> findAll(Class<T> class1, Order order)
			throws DAOException;

	public Query getQuery(String s) throws DAOException;

	public Query getQuery(String s, Serializable serializable)
			throws DAOException;

	public Query getQuery(String s, Serializable aserializable[])
			throws DAOException;

	public Query getQuery(String s, Map map) throws DAOException;

	public List<T> getList(String s) throws DAOException;

	public List<T> getList(String s, Serializable serializable)
			throws DAOException;

	public List<T> getList(String s, Serializable aserializable[])
			throws DAOException;

	public List<T> getList(String s, Map map) throws DAOException;

	public Serializable save(Object obj) throws DAOException;

	public void saveOrUpdate(Object obj) throws DAOException;

	public void update(Object obj) throws DAOException;

	public int delete(Query query) throws DAOException;

	public void delete(Class<T> class1, Serializable serializable)
			throws DAOException;

	public void delete(Class<T> class1, Serializable aserializable[])
			throws DAOException;

	public int updateObject(String s, Serializable aserializable[])
			throws DAOException;

}
